1. Field of the Invention
The present invention relates to an electronic device that performs predetermined processing based on vibrations, and a control program thereof.
2. Description of the Related Art
Conventionally, in response to user's health consciousness, an electronic device such as a mobile phone providing an electronic pedometer function in addition to its original mobile phone communication function has been devised. This electronic pedometer function controls a vibration sensor provided within the electronic device to detect the walking of a user, and counts the number of walking steps. The counted number of walking steps is displayed in the display section.
Also, there has been devised a technique in which a three-axial acceleration sensor is used as a vibration sensor for an electronic pedometer function such as described above, and the number of walking steps is accurately counted based on a composite value of acceleration values in three axial directions (refer to, for example, Japanese Patent Application Laid-Open (Kokai) Publication No. 2006-293860).
However, when the user is on a vehicle such as a train, the vibration sensor detects even vibrations caused by the movement of the train, and miscounts the number of walking steps. For this reason, a technique has been devised in which, if the user is on a vehicle such as a train, the number of walking steps is not counted even when a vibration is detected, and only the number of walking steps resulting from the walking of the user is counted (refer to, for example, Japanese Patent Application Laid-Open (Kokai) Publication No. 2003-156361).
Also, in an electronic device such as the mobile phone, when an incoming call, etc. is received, this is signaled by an alarm sound from the speaker or by vibration of the electronic device by the vibrator therein. Therefore, there is a problem that, when the above-described alarm sound or vibration of the electronic device starts while the number of walking steps is being counted, the three-axial acceleration sensor detects this alarm sound or vibration of the electronic device, and as a result, the counting of the number of walking steps is not accurately performed and the number of walking steps is miscounted.
In such a case, as described in the above Japanese Patent Application Laid-Open (Kokai) Publication No. 2003-156361 for example, a technique in which the number of walking steps is not counted while an incoming call is being signaled may be applicable. However, when an incoming call is signaled while the user is walking, the number of walking steps taken during this time is not counted, and as a result, an accurate number of walking steps is not counted. Therefore, this technique does not solve the above-described problem.
Moreover, the three-axial acceleration sensor is used not only as a pedometer but also, for example, as a so-called motion sensor that detects the movement (motion) of the electronic device itself and initiates a predetermined operation. In this case also, there is a possibility that the motion is erroneously detected when an incoming call, etc. is signaled by an alarm sound or vibration of the electronic device.
Furthermore, this alarm sound or vibration of the electronic device is generated not only when an incoming call is signaled by its phone function but also, for example, at an alarm time set in advance, when a set time of the timer is up, or when a game installed thereon is being played. Therefore, there is a problem that, in such cases, the three-axial acceleration sensor malfunctions and its original function (such as a function for detecting the walking of the user by the vibration sensor and counting the number of walking steps) is not provided.